A relational algebra for SPARQL

نویسنده

  • Richard Cyganiak
چکیده

The SPARQL query language for RDF provides Semantic Web developers with a powerful tool to extract information from large datasets. This report describes a transformation from SPARQL into the relational algebra, an abstract intermediate language for the expression and analysis of queries. This makes existing work on query planning and optimization available to SPARQL implementors. A further translation into SQL is outlined, and mismatches between SPARQL semantics and the relational approach are discussed. The SPARQL query language is one of the latest additions to the Semantic Web toolbox. It provides powerful facilities to extract information out of large sets of RDF data. This report describes a transformation from SPARQL queries into the relational algebra, an intermediate language for the expression and analysis of queries that is widely used in the database area [2]. An RDF graph can be represented as a “table” with three columns, ?subject, ?predicate and ?object. Each row corresponds to one triple. Similarly, the result of a SPARQL SELECT query is a table of RDF nodes. These tables are RDF relations. The algebra described in this report consists of operators on RDF relations. Some of them are well-known from regular relational algebra, others are slightly modified to reproduce SPARQL semantics. Figure 1 shows a SPARQL query and its translation into a relational operator tree. Expressing SPARQL queries in relational algebra has several benefits: – It makes a large body of work on query planning and optimization available to SPARQL implementers. – It simplifies the problem of supporting SPARQL in database-backed RDF stores by splitting off considerations specific to the store’s database layout. Section 3 outlines a translation into SQL. – While this report assumes a simple relation of triples without further substructure as the basic building block of expressions, it might just as well be a “view” on a more complex source of triples, like, for example, a distributed union of RDF graphs, or an application-specific database mapped into RDF. Substituting their definitions into the operator tree, and subsequent use of expression transformation and query planning could yield efficient execution strategies for those complex sources of RDF data. SELECT ?name ?email WHERE { ?person rdf:type foaf:Person . ?person foaf:name ?name . OPTIONAL { ?person foaf:mbox ?email } }

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

From SPARQL to MapReduce: The Journey Using a Nested TripleGroup Algebra

MapReduce-based data processing platforms offer a promising approach for cost-effective and Web-scale processing of Semantic Web data. However, one major challenge is that this computational paradigm leads to high I/O and communication costs when processing tasks with several join operations typical in SPARQL queries. The goal of this demonstration is to show how a system RAPID+, an extension o...

متن کامل

Efficient evaluation of SPARQL over RDFS graphs

Evaluating queries over RDFS is currently done by computing the closure, which is quadratic in the worst case. In this paper, we show how to evaluate SPARQL over RDFS graphs by using a navigational language grounded in standard relational algebra with operators for navigating triples with regular constraints. In particular, we show that there is a fragment of this language with linear time data...

متن کامل

The Expressive Power of SPARQL

This paper studies the expressive power of SPARQL. The main result is that SPARQL and non-recursive safe Datalog with negation have equivalent expressive power, and hence, by classical results, SPARQL is equivalent from an expressive point of view to Relational Algebra. We present explicit generic rules of the transformations in both directions. Among other findings of the paper are the proof t...

متن کامل

The Multiset Semantics of SPARQL Patterns

The paper determines the algebraic and logic structure of the multiset semantics of the core patterns of SPARQL. We prove that the fragment formed by AND, UNION, OPTIONAL, FILTER, MINUS and SELECT corresponds precisely to both, the intuitive multiset relational algebra (projection, selection, natural join, arithmetic union and except), and the multiset non-recursive Datalog with safe negation.

متن کامل

Castor: Using Constraint Programming to Solve SPARQL Queries

As the amount of available data continues to grow in the semantic web, so does the need for efficient query engines. SPARQL [3] is a query language for RDF graphs standardized by the W3C. It is implemented by many triple stores like Sesame, 4store, Virtuoso, etc. However, they are still orders of magnitude slower than traditional relational databases. A key challenge is that SPARQL queries are ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005